import React from "react";

const RefButtonRef = React.forwardRef((props, ref) => {
    console.log(props, ref);

    let handleClick = function () {
        throw new Error('Hello World Error!')
    }

    return (
        <button ref={ref} className="FancyButton" onClick={handleClick.bind(this)}>
            {props.children}
        </button>
    );
});

export default RefButtonRef;